package com.msb.testcollection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * @author weifuqiang
 * @create_time 2022/6/14
 */
public class Test02 {
    public static void main(String[] args) {
        Collection col = new ArrayList();
        col.add(1);
        col.add(2);
        col.add(3);
        col.add(4);

        for(Object o:col){
            System.out.println("ooo"+ o);
        }
        System.out.println("=================");
        Iterator iterator = col.iterator();

        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }

}
